package com.csc.mtlbatch.jde.batchprograms;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.csc.mtlbatch.jde.cls.Ct086;
import com.csc.smart400framework.parent.Mainb;
import com.quipoz.framework.datatype.FixedLengthStringData;
import com.quipoz.framework.datatype.PackedDecimalData;

public class Bt086 extends Mainb {

	private FixedLengthStringData lsaaStatuz = new FixedLengthStringData(4);
	private FixedLengthStringData lsaaBsscrec = new FixedLengthStringData(1024);
	private FixedLengthStringData lsaaBsprrec = new FixedLengthStringData(1024);
	private FixedLengthStringData lsaaBprdrec = new FixedLengthStringData(1024);
	private FixedLengthStringData lsaaBuparec = new FixedLengthStringData(1024);
	
	private FixedLengthStringData wsaaProg = new FixedLengthStringData(5).init("BT086");
	private PackedDecimalData wsaaCommitCnt = new PackedDecimalData(8, 0);
	private PackedDecimalData wsaaCycleCnt = new PackedDecimalData(8, 0);
	private FixedLengthStringData wsspEdterror = new FixedLengthStringData(4);
	
	private static final Logger LOGGER = LoggerFactory.getLogger(Bt086.class);
	
	public void mainline(Object... parmArray)
	{
		lsaaBuparec = convertAndSetParam(lsaaBuparec, parmArray, 4);
		lsaaBprdrec = convertAndSetParam(lsaaBprdrec, parmArray, 3);
		lsaaBsprrec = convertAndSetParam(lsaaBsprrec, parmArray, 2);
		lsaaBsscrec = convertAndSetParam(lsaaBsscrec, parmArray, 1);
		lsaaStatuz = convertAndSetParam(lsaaStatuz, parmArray, 0);
		
		Boolean retGen = false;
		
		LOGGER.info("Call Bt086 FROM CSC-MTL-BATCH PROJECT");

		try {
			
			Ct086 write = new Ct086();
			retGen = write.writing();
			
			if (retGen){
				LOGGER.info("Bt086 file generate Success.");
			}else{
				LOGGER.error("Bt086 file generate fail.");
			}

	    } catch (Exception ex) {
	        LOGGER.error("Problem writing to the file.");
	        ex.printStackTrace();
	    } 
	}
	
	public Bt086() {
		super();
	}

	protected FixedLengthStringData getWsaaProg() {
		return wsaaProg;
		}
	
	protected PackedDecimalData getWsaaCommitCnt() {
		return wsaaCommitCnt;
		}
	
	protected PackedDecimalData getWsaaCycleCnt() {
		return wsaaCycleCnt;
		}
	
	protected FixedLengthStringData getWsspEdterror() {
		return wsspEdterror;
		}
	
	protected FixedLengthStringData getLsaaStatuz() {
		return lsaaStatuz;
		}
	
	protected void setLsaaStatuz(FixedLengthStringData lsaaStatuz) {
		this.lsaaStatuz = lsaaStatuz;
		}
	
	protected FixedLengthStringData getLsaaBsscrec() {
		return lsaaBsscrec;
		}
	
	protected void setLsaaBsscrec(FixedLengthStringData lsaaBsscrec) {
		this.lsaaBsscrec = lsaaBsscrec;
		}
	
	protected FixedLengthStringData getLsaaBsprrec() {
		return lsaaBsprrec;
		}
	
	protected void setLsaaBsprrec(FixedLengthStringData lsaaBsprrec) {
		this.lsaaBsprrec = lsaaBsprrec;
		}
	
	protected FixedLengthStringData getLsaaBprdrec() {
		return lsaaBprdrec;
		}
	
	protected void setLsaaBprdrec(FixedLengthStringData lsaaBprdrec) {
		this.lsaaBprdrec = lsaaBprdrec;
		}
	
	protected FixedLengthStringData getLsaaBuparec() {
		return lsaaBuparec;
		}
	
	protected void setLsaaBuparec(FixedLengthStringData lsaaBuparec) {
		this.lsaaBuparec = lsaaBuparec;
		}
	
	@Override
	protected void close4000() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void commit3500() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void edit2500() {
		// TODO Auto-generated method stub

	}


	@Override
	protected void initialise1000() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void readFile2000() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void restart0900() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void rollback3600() {
		// TODO Auto-generated method stub

	}


	@Override
	protected void update3000() {
		// TODO Auto-generated method stub

	}
	
	public static void main(String args[]){
		
	}
	

}
